package com.gcxy.entity;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author jiang
 * @since 2023-12-12
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Ranch对象")
public class Ranch implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "ranch_id", type = IdType.AUTO)
    private Integer ranchId;

    @ApiModelProperty(value = "唯一,牧场名称")
    @NotNull(message = "牧场名称不能为空")
    @Length(max = 100 , message = "牧场名称不能超过100个字符")
    private String ranchName;


    @ApiModelProperty(value = "场地规模(100~999999)")
    @NotNull(message = "场地规模不能为空")
    @Range(max = 999999 , message =  "场地规模不能超过999999")
    private Integer fieldScale;


    @ApiModelProperty(value = "养殖规模(0~999999)")
    @NotNull(message = "养殖规模不能为空")
    @Range(max = 999999 , message =  "养殖规模不能超过999999")
    private Integer feedScale;

    @ApiModelProperty(value = "省")
    @NotNull(message = "省不能为空")
    private String province;

    @ApiModelProperty(value = "市")
    @NotNull(message = "市不能为空")
    private String city;

    @ApiModelProperty(value = "县")
    @NotNull(message = "县不能为空")
    private String county;

    @ApiModelProperty(value = "详细地址")
    @NotNull(message = "详细地址不能为空")
    private String addrDetail;

    @ApiModelProperty(value = "经度")
    @NotNull(message = "经度不能为空")
    private BigDecimal longitude;

    @ApiModelProperty(value = "纬度")
    @NotNull(message = "纬度不能为空")
    private BigDecimal latitude;

    @ApiModelProperty(value = "字典值编号（关联具体牲畜品种）")
    @NotNull(message =  "字典值编号不能为空")
    private Integer valId;

    @ApiModelProperty(value = "存栏量（默认为0）")
    private Integer amountLivestock;//存栏量

    @ApiModelProperty(value = "是否启用(1:启用，0:停用)")
    private Integer isEnable;//牧场状态

    @ApiModelProperty(value = "创建时间")
    @TableField(fill= FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill =FieldFill.INSERT_UPDATE)
    private Date updateTime;
}
